package aiku.numericalcontroloa.Model.Entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName after_sales
 */
@TableName(value ="after_sales")
@Data
public class AfterSales implements Serializable {
    /**
     * 售后派单id(售后表)
     */
    @TableId(type = IdType.ASSIGN_UUID)
    private String afterSalesId;

    /**
     * 订单id
     */
    private String orderId;

    /**
     * 售后人员id 
     */
    private String userId;

    /**
     * 服务次数
     */
    private Integer serviceFrequency;

    /**
     * 培训情况
     */
    private String training;

    /**
     * 安装时间
     */
    private Date installationTime;

    /**
     * 派单时间
     */
    private Date afterSalesTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AfterSales other = (AfterSales) that;
        return (this.getAfterSalesId() == null ? other.getAfterSalesId() == null : this.getAfterSalesId().equals(other.getAfterSalesId()))
            && (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getServiceFrequency() == null ? other.getServiceFrequency() == null : this.getServiceFrequency().equals(other.getServiceFrequency()))
            && (this.getTraining() == null ? other.getTraining() == null : this.getTraining().equals(other.getTraining()))
            && (this.getInstallationTime() == null ? other.getInstallationTime() == null : this.getInstallationTime().equals(other.getInstallationTime()))
            && (this.getAfterSalesTime() == null ? other.getAfterSalesTime() == null : this.getAfterSalesTime().equals(other.getAfterSalesTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAfterSalesId() == null) ? 0 : getAfterSalesId().hashCode());
        result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getServiceFrequency() == null) ? 0 : getServiceFrequency().hashCode());
        result = prime * result + ((getTraining() == null) ? 0 : getTraining().hashCode());
        result = prime * result + ((getInstallationTime() == null) ? 0 : getInstallationTime().hashCode());
        result = prime * result + ((getAfterSalesTime() == null) ? 0 : getAfterSalesTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", afterSalesId=").append(afterSalesId);
        sb.append(", orderId=").append(orderId);
        sb.append(", userId=").append(userId);
        sb.append(", serviceFrequency=").append(serviceFrequency);
        sb.append(", training=").append(training);
        sb.append(", installationTime=").append(installationTime);
        sb.append(", afterSalesTime=").append(afterSalesTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}